# Contributor: Roberto Oliveira <robertoguimaraes8@gmail.com>
# Maintainer: Roberto Oliveira <robertoguimaraes8@gmail.com>
pkgname=lrzip
pkgver=0.651
pkgrel=0
pkgdesc="compression utility that excels at compressing large files"
url="https://github.com/ckolivas/lrzip"
arch="all"
license="GPL-2.0"
depends="bash"
makedepends="autoconf automake libtool zlib-dev bzip2-dev lzo-dev lz4-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/ckolivas/lrzip/archive/v$pkgver.tar.gz"

# secfixes:
#   0.650-r0:
#     - CVE-2022-28044
#     - CVE-2022-26291
#   0.640-r0:
#     - CVE-2021-27347
#     - CVE-2021-27345
#     - CVE-2020-25467

prepare() {
	default_prepare
	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make check
}

package() {
	make install DESTDIR="$pkgdir"
}

sha512sums="
97671c4705bc06dfd037e38f4384a5ffaf2e3508da217406ac43642b88eae16576818a378bce519812204fecefbd6552a75fc3e74af729ab7b11724b7a6d1998  lrzip-0.651.tar.gz
"
